<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script>
    <c:if test="${inpPaymentsMoneys.size()==0}">
    toastr.warning("暂无结账数据");
    </c:if>
    $(function(){
        $('#rcptsNum').val('${inpAcctMaster.rcptsNum}');
        $("#sumAmount").val('${inpAcctMaster.sumAmount}');
        $("#refundNum").val('${inpAcctMaster.refundNum}');
        $("#chargesAmount").val('${inpAcctMaster.chargesAmount}');
    })
</script>
<div class="col-lg-6">
    <section class="panel">
        <div class="panel-body">
            <table id="contentTable" class="table table-bordered mg-t datatable">
                <thead>
                <tr>
                    <th>类型</th>
                    <th>收款</th>
                    <th>退款</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${inpPaymentsMoneys}" var="payWay">
                    <tr>
                        <td>${fns:getDictLabel(payWay.moneyType, 'PAY_WAY_DICT', '')}</td>
                        <td>${payWay.incomeAmount}</td>
                        <td>${payWay.refundAmount}</td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </section>
</div>
<div class="col-lg-6">
    <section class="panel">
        <div class="panel-body">
            <table class="table table-bordered mg-t datatable">
                <thead>
                <tr>
                    <th>收据号</th>
                    <th>姓名</th>
                    <th>金额</th>
                    <th>支付方式</th>
                    <th>类型</th>
                    <th>日期</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${patPrepayments}" var="payments">
                    <tr>
                        <td>${payments.rcptNo}</td>
                        <td>${payments.name}</td>
                        <td>${payments.amount}</td>
                        <td>${fns:getDictLabel(payments.payWay, 'PAY_WAY_DICT', '')}</td>
                        <td><c:if test="${payments.type=='1'}">收款</c:if><c:if test="${payments.type=='2'}">退款</c:if></td>
                        <td><fmt:formatDate value="${payments.createDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </section>
</div>